package cn.gson.springboot.model.mapper.aftermapper;

import cn.gson.springboot.model.pjos.CheckDetails;
import cn.gson.springboot.model.pjos.CucheckType;
import cn.gson.springboot.model.pjos.Evection;
import cn.gson.springboot.model.vo.aftervo.CucheckVo;
import cn.gson.springboot.model.vo.aftervo.ExpenseVo;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface CucheckMapper {

    //审批分页
    public List<CucheckVo> checkPage(@Param("cutId") Integer cutId,
                                     @Param("apprTitle") String apprTitle,
                                     @Param("employeesId") Integer empId);

    //查询审批类型表
    public List<CucheckType> checkTypeAll();

    //数据回显
    public CucheckVo checkByApprId(Integer apprId);

    //回显需审批的销售费用表
    public ExpenseVo expsByApprId(Integer apprId);

    //回显需审批的出差表
    public Evection evetByApprId(Integer apprId);

    //通过审批id找出审批类型
    public String titleByApprId(Integer apprId);

    //查询审批记录表
    public List<CheckDetails> checkDetailsAll(Integer apprId);

    //通过审批id查询查询出需要审批的表id
    public Integer apprIdsById(Integer apprId);

    //被审批表查询审批记录
    public List<CheckDetails> deliverById(@Param("apprTitle") String apprTitle,
                                          @Param("apprIds")Integer apprIds);

    //通过审批类型和被审批id
    public Integer checkById(@Param("apprTitle") String apprTitle,
                             @Param("apprIds")Integer apprIds);
}
